package org.springblade.modules.repair.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.repair.entity.MaintainMsg;
import org.springblade.modules.repair.vo.MaintainMsgVO;
import org.springblade.modules.repair.vo.MsgTypeVO;

import java.util.List;

public interface MaintainMsgMapper extends BaseMapper<MaintainMsg> {

	/**
	 * 根据分类统计未读消息数量
	 *
	 * @param userId
	 * @return
	 */
	List<MsgTypeVO> listMsgTye(@Param("userId") Long userId);

	List<MaintainMsgVO> selectMsgPage(@Param("keyword") String keyword,@Param("typeIds") String typeIds, @Param("status") Integer status,@Param("bType") Integer bType, @Param("userId") Long userId, IPage<MaintainMsgVO> page);

	MaintainMsgVO selectMsgById(@Param("id") Long id);
}
